<?php
/**
 * 【超人】模块定义
 *
 * @author 超人
 * @url http://s.w7.cc/developer/index/59968
 */
defined('IN_IA') or exit('Access Denied');
require IA_ROOT.'/addons/superman_test/global.php';
class Superman_testModule extends WeModule {
    // ps: 配置此函数时，PC应用入口出现问题无法进入，可能有兼容问题
	public function welcomeDisplay($menus = array()) {
		ob_end_clean();
        @header('Location: '.$this->createWebUrl('dashboard'));
        exit;
	}
	public function settingsDisplay($settings) {
        global $_W, $_GPC;
        $this->module = module_fetch(SUPERMAN_MODULE_NAME);
        $setting = $this->module['config'];
        if (checksubmit('submit')) {
            //TODO
            $this->saveSettings($_GPC['setting']);
            SupermanTestUtil::logging('info', "[module] save setting");
            itoast('更新成功！', '', 'success');
        }
        include $this->template('web/setting');
    }
    public function fieldsFormDisplay($rid = 0) {
	    //TODO
    }
    public function fieldsFormValidate($rid = 0) {
        //TODO
    }
    public function fieldsFormSubmit($rid) {
        //TODO
    }
    public function ruleDeleted($rid) {
        //TODO
    }
}